package com.vcc.service.service;


import cn.hutool.core.date.DateTime;
import com.alibaba.fastjson2.JSONObject;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.service.IService;
import com.vcc.data.entity.RechargeLog;
import com.vcc.data.entity.Role;
import com.vcc.service.boss.request.rechargeLog.AuditOrderDto;

import java.math.BigDecimal;
import java.util.List;

public interface RechargeLogService extends IService<RechargeLog> {

    Page<RechargeLog> paging(
            Role role,
            Long userId,
            Page<RechargeLog> pageable,
            Long targetUserId,
            Integer useFlag,
            Integer status,
            String remark,
            String startDate,
            String endDate
    );

    Page<RechargeLog> paging(
            Long userId,
            Page<RechargeLog> pageable,
            Long targetUserId,
            Integer useFlag,
            Integer status,
            String remark,
            String startDate,
            String endDate,
            Long dealerId
    );

    public Boolean audit(AuditOrderDto auditOrderDto);

    public Boolean autoAudit(AuditOrderDto auditOrderDto);

    Boolean verifyAmount(BigDecimal amount);

    Boolean existsByPendingOrder(Long userId);

    Boolean updateStatusAndRemark(String orderId, Integer status, String remark);

    Boolean updateStatusAndAuditRemark(String orderId, Integer status, String auditRemark);

    RechargeLog getByOrderId(String orderId);

    Boolean existsByVoucher(String voucher);

    List<JSONObject> statistics();

    List<JSONObject> statistics(DateTime startDate, DateTime endDate);

    List<JSONObject> statistics(DateTime startDate, DateTime endDate, Long userId,Long dealerId);

    JSONObject statisticsByDates(DateTime startDate, DateTime endDate);
}
